package com.ruoyi.system.wnjk.service.impl;


import com.ruoyi.system.wnjk.domain.po.WnjkDoctor;
import com.ruoyi.system.wnjk.mapper.WnjkDoctorMapper;
import com.ruoyi.system.wnjk.service.IWnjkDoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 医生信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-06
 */
@Service
public class WnjkDoctorServiceImpl implements IWnjkDoctorService {
    @Autowired
    private WnjkDoctorMapper wnjkDoctorMapper;

    /**
     * 查询医生信息
     *
     * @param id 医生信息主键
     * @return 医生信息
     */
    @Override
    public WnjkDoctor selectWnjkDoctorById(Long id) {
        return wnjkDoctorMapper.selectWnjkDoctorById(id);
    }

    /**
     * 查询医生信息列表
     *
     * @param wnjkDoctor 医生信息
     * @return 医生信息
     */
    @Override
    public List<WnjkDoctor> selectWnjkDoctorList(WnjkDoctor wnjkDoctor) {
        return wnjkDoctorMapper.selectWnjkDoctorList(wnjkDoctor);
    }

    /**
     * 新增医生信息
     *
     * @param wnjkDoctor 医生信息
     * @return 结果
     */
    @Override
    public int insertWnjkDoctor(WnjkDoctor wnjkDoctor) {
        return wnjkDoctorMapper.insertWnjkDoctor(wnjkDoctor);
    }

    /**
     * 修改医生信息
     *
     * @param wnjkDoctor 医生信息
     * @return 结果
     */
    @Override
    public int updateWnjkDoctor(WnjkDoctor wnjkDoctor) {
        return wnjkDoctorMapper.updateWnjkDoctor(wnjkDoctor);
    }

    /**
     * 批量删除医生信息
     *
     * @param ids 需要删除的医生信息主键
     * @return 结果
     */
    @Override
    public int deleteWnjkDoctorByIds(Long[] ids) {
        return wnjkDoctorMapper.deleteWnjkDoctorByIds(ids);
    }

    /**
     * 删除医生信息信息
     *
     * @param id 医生信息主键
     * @return 结果
     */
    @Override
    public int deleteWnjkDoctorById(Long id) {
        return wnjkDoctorMapper.deleteWnjkDoctorById(id);
    }

    @Override
    public List<WnjkDoctor> selectDoctorByHospitalId(Long id) {
        return wnjkDoctorMapper.selectWnjkDoctorListByHospitalId(id);
    }
}
